/**
 * Copyright 2014 the original author or authors. All rights reserved.
 */
package com.visionet.security.domain.entity;

import javax.persistence.*;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import com.visionet.jumper.core.domain.entity.BaseEntity;
import com.visionet.security.base.enums.ResourceType;

/**
 * 资源信息
 *
 * @author suxiaojing
 * @date 
 * @since 0.0.1
 */
@Entity(name = "Resource")
@Table(name = "t_resource")
@DynamicInsert
@DynamicUpdate
public class Resource extends BaseEntity {
	
	private static final long serialVersionUID = -613260480085135728L;
	
	private String name;
	
	@Enumerated(EnumType.STRING)
	private ResourceType type;
	
	@ManyToOne
	private Resource parent;

	private String definition;
	
	private String remarks;

	private String domain;
	
	private Integer level;
	
	private Integer orderNo;

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name
	 *            the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return the parent
	 */
	public Resource getParent() {
		return parent;
	}

	/**
	 * @param parent
	 *            the parent to set
	 */
	public void setParent(Resource parent) {
		this.parent = parent;
	}

	/**
	 * @return the level
	 */
	public Integer getLevel() {
		return level;
	}

	/**
	 * @param level
	 *            the level to set
	 */
	public void setLevel(Integer level) {
		this.level = level;
	}

	/**
	 * @return the type
	 */
	public ResourceType getType() {
		return type;
	}

	/**
	 * @param type
	 *            the type to set
	 */
	public void setType(ResourceType type) {
		this.type = type;
	}

	/**
	 * @return the orderNo
	 */
	public Integer getOrderNo() {
		return orderNo;
	}

	/**
	 * @param orderNo
	 *            the orderNo to set
	 */
	public void setOrderNo(Integer orderNo) {
		this.orderNo = orderNo;
	}


	public String getRemarks() {
		return remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}

	public String getDefinition() {
		return definition;
	}

	public void setDefinition(String definition) {
		this.definition = definition;
	}

	public String getDomain() {
		return domain;
	}

	public void setDomain(String domain) {
		this.domain = domain;
	}

}
